package com.eagle.depthinspringboot;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class SpringApplicationEventBootstrap {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();

		ctx.addApplicationListener(event -> {
			System.out.println("监听到事件：" + event);
		});
		ctx.refresh();

		ctx.publishEvent("hello eagle");

		ctx.close();

	}
}
